#include<iostream>
using namespace std;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int n;
    cin>>n;
    int r[n];
    for(int i=0;i<n;i++) cin>>r[i];
    int lose[n]{0};
    int win[n]{0};
    for(int k=0;k<n/2+1;k++)
    {
        for(int i=0;i<n;i++)
        {
            if(lose[i]==1||win[i]==1) continue;
            for(int j=0;j<n;j++)
            {
                if(j!=i&&lose[j]==0&&r[j]<r[i])
                {
                    win[i]=1;
                    lose[j]=1;
                    break;
                }
            }
        }
    }
    int life=0;
    for(int l:lose) life+=l==0?1:0;
    cout<<life;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
